package com.fsc.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fsc.entity.domain.ClassInfo;
import com.fsc.entity.domain.StuPartTeach;
import com.fsc.service.StuPartTeachService;
import com.fsc.mapper.StuPartTeachMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86183
* @description 针对表【stu_part_teach(学生、父母、老师、班级关系表)】的数据库操作Service实现
* @createDate 2024-06-02 13:15:22
*/
@Service
public class StuPartTeachServiceImpl extends ServiceImpl<StuPartTeachMapper, StuPartTeach>
    implements StuPartTeachService{

    @Override
    public int[] getStuIdsByTeaId(Integer teacherId) {
        return this.baseMapper.getStuIdsByTeaId(teacherId);
    }

    @Override
    public int[] getStuIdsByParId(Integer parentId) {
        return this.baseMapper.getStuIdsByParId(parentId);
    }

    @Override
    public int getClassIdByStuId(int id) {
        return this.baseMapper.getClassIdByStuId(id);
    }


	@Autowired
	private StuPartTeachMapper stuPartTeachMapper;
	@Override
	public List<Integer> getStudent(Integer teacherId) {
		return stuPartTeachMapper.selectStudentIdsByTeacherId(teacherId);
	}

    @Override
    public List<Integer> getStudentByParentId(Integer parentId) {
        return this.baseMapper.selectStudentIdsByParentId(parentId);
    }


    @Override
    public  List<Integer> getClassIdByTeacherId(int teacherId) {
        return stuPartTeachMapper.getClassIdByTeacherId(teacherId);
    }
    @Override
    public List<Integer> getClassIdByParentId(int parentId) {
        return stuPartTeachMapper.getClassIdByParentId(parentId);
    }
    @Override
    public List<Integer> getClassIdByStudentId(int studentId) {
        return stuPartTeachMapper.getClassIdByStudentId(studentId);
    }
    @Override
    public List<Integer> getAllClassIds() {
        return stuPartTeachMapper.findAllClassIds();
    }
}




